<?php defined('SYSPATH') or die('No direct script access.');

class Role_Model extends Model {
    public function insert_role($data){
        $query = $this->db->insert('role', $data);
    }
    
    public function get_role($id_role) {
        return ($this->db->from('role')->where('ID_role', $id_role)->get());
    }
    
    public function get_all_role(){
        return ($this->db->from('role')->orderby('ID_role')->get());
    }
    
    public function update_role($id_role, $data) {
        $this->db->where('ID_role', $id_role);
        $this->db->update('role', $data);
    }
}